package cn.niit.dao;

import cn.niit.entity.SysRoleResource;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;

@Mapper
public interface SysRoleResourceMapper {
    @Insert({
        "insert into t_sys_role_resource (id, role_id, ",
        "resource_id, gmt_create, ",
        "gmt_update, create_user_id, ",
        "create_user_name, modify_user_id, ",
        "modify_user_name)",
        "values (#{id,jdbcType=BIGINT}, #{roleId,jdbcType=BIGINT}, ",
        "#{resourceId,jdbcType=BIGINT}, #{gmtCreate,jdbcType=TIMESTAMP}, ",
        "#{gmtUpdate,jdbcType=TIMESTAMP}, #{createUserId,jdbcType=BIGINT}, ",
        "#{createUserName,jdbcType=VARCHAR}, #{modifyUserId,jdbcType=BIGINT}, ",
        "#{modifyUserName,jdbcType=VARCHAR})"
    })
    int insert(SysRoleResource record);

    int insertSelective(SysRoleResource record);
}